<!DOCTYPE html>
<html>
<head>
{include file="common/head"}
</head>
{include file="common/header"}
<style type="text/css">
.search-row h3 a{color: #2440b3;text-decoration: underline;}
</style>


<body>
  <div class="layui-container" style="margin-top: 80px;">
	
	
	<div class="layui-row" style="padding: 0 15px;margin-top: 10px;">
		
		<div class="layui-col-md12">
			<form class="layui-form" style="margin-top: 14px;">
				<input type="hidden" name="type" value="{$type}"/>
				<div class="layui-form-item" style="margin-bottom: 0;">
		          <div class="layui-inline">
		          	<div class="layui-form-text">
		            	<input type="text" name="wd" autocomplete="off" placeholder="请输入搜索内容" class="layui-input">
		            </div>
		          </div>
		          <div class="layui-inline">
		          	<button class="layui-btn" lay-submit="" lay-filter="J_searchForm">搜索</button>
		          </div>
		        </div>
			</form>
		</div>
	</div>

	<div class="layui-row">
		<div class="layui-tab layui-tab-brief" lay-filter="component-tabs-brief">
			<ul class="layui-tab-title">
				<li{if $type eq 'question'} class="layui-this"{/if}><a href="{:url('wendasns/common/search',['wd'=>$wd,'type'=>'question'],false)}">问题</a></li>
				<li{if $type eq 'article'} class="layui-this"{/if}><a href="{:url('wendasns/common/search',['wd'=>$wd,'type'=>'article'],false)}">文章</a></li>
			</ul>
			<div class="layui-tab-content">
				<div class="layui-tab-item layui-show">
					<div style="margin-bottom: 10px;">为您找到相关结果约{$logs->total()}条</div>
					<div class="search-row">
					{volist name="logs" id="item"}
						<div class="" style="margin-bottom: 20px;">
							<div><h3><a href="{:url('wendasns/'.$type.'/show',$item)}">{$item.title|raw}</a></h3></div>
							<div>{$item.content|raw}</div>
							<div><font color="#3A8000">{:range_time($item.create_time,'Y-m-d H:i')}</font> - <a href="{:url('wendasns/home/index',['id'=>$item.users.id],false)}">{$item.users.username}</a></div>
						</div>
					{/volist}
						<div class="pager" style="text-align: left;">{$logs->render()|raw}</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	</div>
{include file="common/footer"}
</body>
</html>